package com.yidu.best.systemManagement.Authority.domain;


public class AuthorityUser {
	
	private String userId;
	private String userName;
    private Integer useable;
	private AuthorityRole role;
	
	
	public AuthorityUser() {
	}


	public AuthorityUser(String userId, String userName, Integer useable, AuthorityRole role) {
		super();
		this.userId = userId;
		this.userName = userName;
		this.useable = useable;
		this.role = role;
	}


	@Override
	public String toString() {
		return "AuthorityUser [userId=" + userId + ", userName=" + userName + ", useable=" + useable + ", role=" + role
				+ "]";
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((role == null) ? 0 : role.hashCode());
		result = prime * result + ((useable == null) ? 0 : useable.hashCode());
		result = prime * result + ((userId == null) ? 0 : userId.hashCode());
		result = prime * result + ((userName == null) ? 0 : userName.hashCode());
		return result;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		AuthorityUser other = (AuthorityUser) obj;
		if (role == null) {
			if (other.role != null)
				return false;
		} else if (!role.equals(other.role))
			return false;
		if (useable == null) {
			if (other.useable != null)
				return false;
		} else if (!useable.equals(other.useable))
			return false;
		if (userId == null) {
			if (other.userId != null)
				return false;
		} else if (!userId.equals(other.userId))
			return false;
		if (userName == null) {
			if (other.userName != null)
				return false;
		} else if (!userName.equals(other.userName))
			return false;
		return true;
	}


	public String getUserId() {
		return userId;
	}


	public void setUserId(String userId) {
		this.userId = userId;
	}


	public String getUserName() {
		return userName;
	}


	public void setUserName(String userName) {
		this.userName = userName;
	}


	public Integer getUseable() {
		return useable;
	}


	public void setUseable(Integer useable) {
		this.useable = useable;
	}


	public AuthorityRole getRole() {
		return role;
	}


	public void setRole(AuthorityRole role) {
		this.role = role;
	}

	
}
